<%@ page language="java" contentType="text/html; charset=utf-8"    pageEncoding="utf-8"%>
<%@include file="header.jsp"%>
<script>
$(document).ready(
	function(){
    	$("table tbody tr:even").addClass("tdbgcolor1"); 
    	$("table tbody tr:odd").addClass("tdbgcolor2"); 
	}
);

function selectSmsOne(obj){
	$(":checkbox").each(function(){
   		this.checked=false;
	});
	obj.checked=true;
}
function checkSelect(){
	var item = "";
    $("input[name='selectTypeValue']").each(function(){
        if(this.checked){
        	item=$(this).val();
        }
        });
    /*
	var item2 =$('input[name=selectTypeValue][@checked]').val();
	alert(item2);
	*/
	window.parent.setProductTypeValue(item);
}

function Ok(){
	checkSelect();
	return true; 
}

</script>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.STYLE1 {
	color: #666666;
	font-weight: bold;
}
.STYLE5 {color: #666666}
.STYLE6 {
	color: #135294;
	font-weight: bold;
}
-->
</style>
<div align="left">
<s:iterator value="listAllParents" status="status">
	<s:if test="#status.index == 0">
   		<a href="admin/productTypeListSel.action?productTypeParenBean.parentId=<%=com.remist.common.Constant.LEVEL_ROOT %>">产品类别列表</a>
	</s:if>
	<s:if test="#status.count>0 && #status.index < #status.count">
	   &nbsp;>><a href="productTypeListSel.action?productTypeParenBean.parentId=<s:property value='id'/>"><s:property value="name"/></a>
	</s:if>
</s:iterator>
</div>
<div align="center">产品类型列表</div>
 <table width="95%"  border="0" cellpadding="3" cellspacing="2" bgcolor="#FFFFFF" align="center">
   <tr>
     <td nowrap background="images/bg_table.jpg" bgcolor="#ECEAE6">名称</td>
     <td nowrap background="images/bg_table.jpg" bgcolor="#ECEAE6">操作</td>
   </tr>
   <s:iterator value="productTypes">
     <tr bgcolor='#F1F3F5' onmouseover = "this.style.backgroundColor = '#FFDCB0'" onmouseout = "this.style.backgroundColor = ''" style='cursor:hand'>
       <td><a href="productTypeListSel.action?productTypeParenBean.parentId=<s:property value='id'/>" tip='<s:property value="name"/>'><s:property value="name"/></a></td>
       <td>
       	<input type="checkbox" name="selectTypeValue" value="<s:property value='id'/>#&*<s:property value='name'/>" onclick='selectSmsOne(this)'/>
    	</td>
     </tr>
   </s:iterator>
     <%--
   <tr>
     <td colspan="2" nowrap  bgcolor='#E4EDF9'>
     	<a href="userList.action?currentPage=<s:property value='prevPage'/>">上一页</a> 
     	<a href="userList.action?currentPage=<s:property value='nextPage'/>">下一页</a>
     	共 <s:property value='totalPage'/>页 
     	<a href="productTypeBeforeAdd.action?productTypeParenBean.parentId=<s:property value='productTypeParenBean.parentId'/>">新增</a>
     </td>
   </tr>
      --%>
</table>
 